Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Time Base Functions


Time Base Callback Functions

If your application uses QuickTime time bases, it may define callback functions that are associated with a specific time base. Your application can then use these callback functions to perform activities that are triggered by temporal events, such as a certain time being reached or a specified rate being achieved. The time base functions of the Movie Toolbox interact with clock components to schedule the invocation of these callback functions--clock components are responsible for invoking the callback function at its scheduled time. Your application can use the functions described in this section to establish your own callback function and to schedule callback events.

You can define three types of callback events. These types are distinguished by the nature of the temporal event that triggers the Movie Toolbox to call your function. The three types are

You specify a callback event's type when you define the callback event, using the NewCallBack function.

You specify whether your event can occur at interrupt time when you define the callback event, using the NewCallBack function. Your function is called closer to the triggering event at interrupt time, but it is subject to all the restrictions of interrupt functions (for example, your callback function cannot cause memory to be moved). If your function is not called at interrupt time, you are free of these restrictions--but your function may be called later, because the invocation is delayed to avoid interrupt time.

The NewCallBack function allocates the memory to support a callback event.
When you are done with the callback event, you dispose of it by calling the DisposeCallBack function.

You schedule a callback event by calling the CallMeWhen function. Call CancelCallBack function to unschedule a callback event.

You can retrieve the time base of a callback event by calling the GetCallBackTimeBase function. You can obtain the type of a callback event by calling the GetCallBackType function.


Subtopics
NewCallBack
CallMeWhen
CancelCallBack
DisposeCallBack
GetCallBackTimeBase
GetCallBackType

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996